package com.pic.mgt.monitor.check;

import com.pic.mgt.monitor.WrongUnitFormatException;

public class BizFilenameSuffixCheck implements FormatCheck {
	private String businessConfirmationSuffix;

	@Override
	public void check(String confirmationFilename)
								throws WrongUnitFormatException {
		if (!confirmationFilename.endsWith(businessConfirmationSuffix)) {
			throw new WrongUnitFormatException(
					"Wrong confirmation suffix : '" + confirmationFilename + "'");
		}
	}
	
	// --- getter and setter ---

	public void setBusinessConfirmationSuffix(String businessConfirmationSuffix) {
		this.businessConfirmationSuffix = businessConfirmationSuffix;
	}
}
